let CONFIG = {
    serviceProxy: {
        default: "/ysms-nmg",
        brainVision: "/ysms-brainVision",
        ats: "/ysms-ats"
    },
    extend: {
        //当不需要开启微服务nacos时，设置为空即可
        nacos: "ysms-ats-web",
        //当不需要开启微服务nacos时，设置为false
        sso: true
    },
    rsCode: "AT", //唯一资源码
    userCenter: "/ysms-nmg-web/homes"
};

//设置开发环境中的一些变化
if (window.__devenv) {
    CONFIG.serviceProxy.default = "http://101.43.222.100:9189/ysms-nmg";
    CONFIG.serviceProxy.ats = "http://62.234.190.233:3710/ysms-ats";
    CONFIG.serviceProxy.brainVision =
        "http://101.43.222.100:10177/ysms-brainVision";
    CONFIG.extend.sso = false;
}

let NotAlter = obj => {
    if (typeof obj === "object" && obj != null) {
        for (let key in obj) {
            if (typeof key === "object" && key != null) {
                NotAlter(key);
            } else {
                Object.defineProperty(obj, key, { writable: false });
            }
        }
    }
};
NotAlter(CONFIG);
window.__GlobalConfig = CONFIG;
